package com.guldan.jaina.utils;

import com.guldan.core.utils.DateUtil;
import com.guldan.jaina.dto.registersuccess.RegisterSuccessDTO;
import com.guldan.mapper.db.entity.RegisterSuccess;

/**
 * Created by Silas.
 * Date: 2016/12/3
 * Time: 16:49
 */
public class RegisterSuccessDomainConvertUtils {

    public static RegisterSuccessDTO convert(RegisterSuccess entity) {
        RegisterSuccessDTO dto = new RegisterSuccessDTO();

        dto.setRegisterId(entity.getRegisterId());
        dto.setUploadId(entity.getUploadId());
        dto.setBatchId(entity.getBatchId());
        dto.setSummaryId(entity.getSummaryId());
        dto.setCitizenInfoId(entity.getCitizenInfoId());
        dto.setProjectId(entity.getProjectId());
        dto.setYear(entity.getYear());
        dto.setIdentTypeCode(entity.getIdentTypeCode());
        dto.setIdentNumber(entity.getIdentNumber());
        dto.setName(entity.getName());
        dto.setNameZw(entity.getNameZw());
        dto.setGenderCode(entity.getGenderCode());
        dto.setNationCode(entity.getNationCode());
        dto.setDegreeCode(entity.getDegreeCode());
        dto.setAge(entity.getAge());
        dto.setBirthday(DateUtil.toLocaleString(entity.getBirthday(), DateUtil.DEFAULT_DATE_FORMAT));
        dto.setAddress(entity.getAddress());
        dto.setAddressZw(entity.getAddressZw());
        dto.setTelephone(entity.getTelephone());
        dto.setAreaId(entity.getAreaId());
        dto.setCitizenInfoTypeCode(entity.getCitizenInfoTypeCode());
        dto.setMaster(entity.getIsMaster());
        dto.setRelationCode(entity.getRelationCode());
        dto.setHouseholdId(entity.getHouseholdId());
        dto.setHouseholdRegisterNumber(entity.getHouseholdRegisterNumber());
        dto.setTownReigsterId(entity.getTownReigsterId());
        dto.setTownRegisterTime(DateUtil.toLocaleString(entity.getTownRegisterTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setTownAuditor(entity.getTownAuditor());
        dto.setTownAuditTime(DateUtil.toLocaleString(entity.getTownAuditTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setOrgAuditorId(entity.getOrgAuditorId());
        dto.setOrgAuditTime(DateUtil.toLocaleString(entity.getOrgAuditTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setFinanceAuditorId(entity.getFinanceAuditorId());
        dto.setFinanceAuditTime(DateUtil.toLocaleString(entity.getFinanceAuditTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setFinancePayerId(entity.getFinancePayerId());
        dto.setDeliverBankDate(DateUtil.toLocaleString(entity.getDeliverBankDate(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setBankPayDate(DateUtil.toLocaleString(entity.getBankPayDate(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setBankCode(entity.getBankCode());
        dto.setBankNumber(entity.getBankNumber());
        dto.setState(entity.getState());
        dto.setFailReason(entity.getFailReason());
        dto.setSubsidyCount(entity.getSubsidyCount());
        dto.setOrgCode(entity.getOrgCode());
        dto.setPayStandardAmt(entity.getPayStandardAmt());
        dto.setSubsidyNum(entity.getSubsidyNum());
        dto.setArea(entity.getArea());
        dto.setTotalFormula(entity.getTotalFormula());
        dto.setSubsidyMoney(entity.getSubsidyMoney());
        dto.setPayCycleCode(entity.getPayCycleCode());

        dto.setCreateTime(DateUtil.toLocaleString(entity.getCreateTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));
        dto.setCreator(entity.getCreator());
        dto.setDelete(entity.getIsDelete());
        dto.setDisabled(entity.getDisabled());
        dto.setModifier(entity.getModifier());
        dto.setModifyTime(DateUtil.toLocaleString(entity.getModifyTime(), DateUtil.YYYY_MM_DD_HH_DD_SS));

        return dto;
    }

}
